# Contributor: cristian_ci <cristian_ci@protonmail.com>
# Maintainer: cristian_ci <cristian_ci@protonmail.com>
pkgname=nm-tray
pkgver=0.5.0
pkgrel=0
pkgdesc="Simple NetworkManager front end based on Qt"
url="https://github.com/palinek/nm-tray"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	cmake
	networkmanager-qt5-dev
	qt5-qtbase-dev
	qt5-qttools-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/palinek/nm-tray/archive/refs/tags/$pkgver.tar.gz"
options="!check" # no test suite

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DNM_TRAY_XDG_AUTOSTART_DIR=/etc/xdg/autostart
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

lang() {
	install_if="lang $pkgname=$pkgver-r$pkgrel"
	amove usr/share/$pkgname/*.qm
}

sha512sums="
ba118f7fd07a60af5ed6b7b53cf771f339c89f9bef02aeb2f59bfbddd3e896bdc31aa506437e33cb8fe2ef921c595b76527d61cefd202e9e1f5197762b69ab51  nm-tray-0.5.0.tar.gz
"
